#coding:utf-8
'''
* coder  : dzlua
* email  : 505544956@qq.com
* module : ApiMgr-server
* path   : app/cmds
* file   : __init__.py
* time   : 2017-11-07 16:21:26
'''
#--------------------#
from flask_migrate import MigrateCommand
#----------#
from app.mgr import manager
from app.mgr import db
#--------------------#

#--------------------#
manager.add_command('db', MigrateCommand)
#--------------------#

#--------------------#
@manager.command
def deploy():
    '''deploy database.'''
    db.create_all()
#--------------------#

#--------------------#
@manager.command
def dropall():
    '''drop all tables from database.'''
    db.drop_all()
#--------------------#
